<!DOCTYPE html>
<html lang="zh-cn">
<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <title>{$CONF['mallTitle']}后台管理中心</title>
    <link href="__PUBLIC__/plugins/bootstrap/css/bootstrap.min.css" rel="stylesheet">
    <link href="__ROOT__/Apps/Admin/View/css/AdminLTE.css" rel="stylesheet" type="text/css" />
    <!--[if lt IE 9]>
    <script src="__PUBLIC__/js/html5shiv.min.js"></script>
    <script src="__PUBLIC__/js/respond.min.js"></script>
    <![endif]-->
    <script src="__PUBLIC__/js/jquery.min.js"></script>
    <script src="__PUBLIC__/plugins/bootstrap/js/bootstrap.min.js"></script>
    <script src="__PUBLIC__/js/common.js"></script>
    <script src="__PUBLIC__/plugins/plugins/plugins.js"></script>
    <script src="__PUBLIC__/plugins/kindeditor/kindeditor.js"></script>
    <script src="__PUBLIC__/plugins/kindeditor/lang/zh-CN.js"></script>
</head>
<style>
    .wst-tab-box{width:100%; height:auto; margin:0px auto;}
    .wst-tab-nav{margin:0; padding:0; height:25px; line-height:24px;position: relative;top:2px;left:3px;}
    .wst-tab-nav li{cursor:pointer;float:left; margin:0 0px; list-style:none; border:1px solid #ddd; border-bottom:none; height:24px; width:100px; text-align:center; background:#eeeeee;color:#000000;}
    .wst-tab-nav .on{background:#ffffff;color:#000000;border-bottom:0 none;}
    .wst-tab-content{padding:5px;width:99%; height:auto; border:1px solid #ddd;background:#FFF;}
    .wst-gallery-imgs{width:770px;height:auto;}
    .wst-gallery-img{width:140px;height:100px;float:left;overflow:hidden;margin:10px 5px 5px 5px;}
</style>
<script>
    $(function () {
        $('#tab').TabPanel2({tab:0});
        $('#priceTab').TabPanel({tab:0});
        KindEditor.ready(function(K) {
            editor1 = K.create('textarea[name="goodsDesc"]', {
                height:'250px',
                allowFileManager : false,
                allowImageUpload : true,
                items:[
                    'source', '|', 'undo', 'redo', '|', 'preview', 'print', 'template', 'code', 'cut', 'copy', 'paste',
                    'plainpaste', 'wordpaste', '|', 'justifyleft', 'justifycenter', 'justifyright',
                    'justifyfull', 'insertorderedlist', 'insertunorderedlist', 'indent', 'outdent', 'subscript',
                    'superscript', 'clearhtml', 'quickformat', 'selectall', '|', 'fullscreen', '/',
                    'formatblock', 'fontname', 'fontsize', '|', 'forecolor', 'hilitecolor', 'bold',
                    'italic', 'underline', 'strikethrough', 'lineheight', 'removeformat', '|','image','table', 'hr', 'emoticons', 'baidumap', 'pagebreak',
                    'anchor', 'link', 'unlink', '|', 'about'
                ],
                afterBlur: function(){ this.sync(); }
            });
        });
    });
    function changeStatus(id,v){
        Plugins.waitTips({title:'信息提示',content:'正在操作，请稍后...'});
        $.post("{:U('Admin/Goods/changeGoodsStatus')}",{id:id,status:v},function(data,textStatus){
            var json = WST.toJson(data);
            if(json.status=='1'){
                Plugins.setWaitTipsMsg({ content:'操作成功',timeout:1000,callback:function(){
                    location.href="{:U('Admin/Goods/index')}";
                }});
            }else{
                Plugins.closeWindow();
                Plugins.Tips({title:'信息提示',icon:'error',content:'操作失败!',timeout:1000});

            }
        });
    }
</script>
<body class="wst-page">
<form name="myform" method="post" id="myform">
    <div id='tab' class="wst-tab-box">
        <ul class="wst-tab-nav">
            <li>商品信息</li>
            <if condition="$object.goodsCatId1 eq 4 or $object.goodsCatId1 eq 5 or $object.goodsCatId1 eq 6">
                <li>购买须知</li>
            </if>
            <if condition="$object.goodsCatId1 eq 7">
                <li>行程</li>
            </if>
        </ul>
        <div class="wst-tab-content" style='width:98%;'>
            <div class='wst-tab-item'>
                <form name="myform" method="post" id="myform">
                    <input type='hidden' id='id' value='{$object.goodsId}'/>
                    <input type='hidden' id='shopId' value='{$object.shopId}'/>
                    <table class="table table-hover table-striped table-bordered wst-form">
                        <tr>
                            <th width='120'>商品编号：</th>
                            <td width='730'>
                                {$object.goodsSn}
                            </td>
                            <td rowspan='4' style='padding:5px;'>
                                <img id='goodsImgPreview' src='<if condition="$object['goodsImg'] =='' ">__ROOT__/Apps/Home/View/default/img/store_default_sign.png<else/>__ROOT__/{$object['goodsImg']}</if>' width='160' height='160'/><br/>
                            </td>
                        </tr>
                        <tr>
                            <th width='120'>商品名称<font color='red'>*</font>：</th>
                            <td>{$object.goodsName}</td>
                        </tr>


                        <if condition="$object.goodsCatId1 eq 5 or $object.goodsCatId1 eq 6">
                            <tr>
                                <th width='120'>价格<font color='red'>*</font>：</th>
                                <td >
                                    <div class="wst-tab_box"  id="priceTab">
                                        <ul class="wst-tab-nav">
                                            <li>周一</li>
                                            <li>周二</li>
                                            <li>周三</li>
                                            <li>周四</li>
                                            <li>周五</li>
                                            <li>周六</li>
                                            <li>周日</li>
                                        </ul>
                                        <div class="wst-tab-content priceTabContent" style="height:200px;overflow-y: scroll;">
                                            <div class="wst-tab-item" style="position: relative;style='display:none'">
                                                <!--<div class='wst-tbar-group' style='text-align:right'>-->
                                                <!--<span></span>-->
                                                <!--<button class="btn btn-default" type="button" style="padding: 6px 12px;height: 30px;line-height: 16px;margin-top: 0px;cursor: pointer;" id="toAddSchedule">新增</button>&nbsp;-->
                                                <!--</div>-->

                                                <table class='wst-list table1 '>
                                                    <thead>
                                                    <tr>

                                                        <th width="230">开始</th>
                                                        <th width="230">结束</th>
                                                        <th width="230">价格</th>



                                                    </tr>
                                                    </thead>
                                                    <tbody>
                                                    <volist name="monPrice" id="vo" key='i'>
                                                        <tr class="priceTr">
                                                            <td style="display:none;" class="priceId">{$vo['priceId']}</td>
                                                            <td class="priceStartTime">{:WSTFloatToTime($vo['periodStart'])}</td>
                                                            <td class="tomCheck" style="display:none">{$vo['isTom']}</td>
                                                            <td class="priceEndTime"><if condition="$vo['isTom'] eq 1">次日<else/>今日</if>{:WSTFloatToTime($vo['periodEnd'])}</td>
                                                            <td class = "periodPrice" >{$vo['price']}</td>
                                                            <td style = "display:none" class="action">2</td>

                                                        </tr>
                                                    </volist>
                                                    <tfoot>
                                                    </tfoot>
                                                    </tbody>
                                                </table>
                                            </div>

                                            <div class='wst-tab-item' style="position: relative;style='display:none'">
                                                <table class='wst-list table2'>
                                                    <thead>
                                                    <tr>

                                                        <th width="230">开始</th>
                                                        <th width="230">结束</th>
                                                        <th width="230">价格</th>




                                                    </tr>
                                                    </thead>
                                                    <tbody>
                                                    <volist name="tuePrice" id="vo" key='i'>
                                                        <tr class="priceTr">
                                                            <td style="display:none;" class="priceId">{$vo['priceId']}</td>
                                                            <td class="priceStartTime">{:WSTFloatToTime($vo['periodStart'])}</td>
                                                            <td class="tomCheck" style="display:none">{$vo['isTom']}</td>
                                                            <td class="priceEndTime"><if condition="$vo['isTom'] eq 1">次日<else/>今日</if>{:WSTFloatToTime($vo['periodEnd'])}</td>
                                                            <td class = "periodPrice" >{$vo['price']}</td>
                                                            <td style = "display:none" class="action">2</td>

                                                        </tr>
                                                    </volist>
                                                    <tfoot>
                                                    </tfoot>
                                                    </tbody>
                                                </table>
                                            </div>
                                            <div class='wst-tab-item' style="position: relative;style='display:none'">
                                                <table class='wst-list table3'>
                                                    <thead>
                                                    <tr>

                                                        <th width="230">开始</th>
                                                        <th width="230">结束</th>
                                                        <th width="230">价格</th>




                                                    </tr>
                                                    </thead>
                                                    <tbody>
                                                    <volist name="wedPrice" id="vo" key='i'>
                                                        <tr class="priceTr">
                                                            <td style="display:none;" class="priceId">{$vo['priceId']}</td>
                                                            <td class="priceStartTime">{:WSTFloatToTime($vo['periodStart'])}</td>
                                                            <td class="tomCheck" style="display:none">{$vo['isTom']}</td>
                                                            <td class="priceEndTime"><if condition="$vo['isTom'] eq 1">次日<else/>今日</if>{:WSTFloatToTime($vo['periodEnd'])}</td>
                                                            <td class = "periodPrice" >{$vo['price']}</td>
                                                            <td style = "display:none" class="action">2</td>

                                                        </tr>
                                                    </volist>
                                                    <tfoot>
                                                    </tfoot>
                                                    </tbody>
                                                </table>
                                            </div>
                                            <div class='wst-tab-item' style="position: relative;style='display:none'">
                                                <table class='wst-list table4'>
                                                    <thead>
                                                    <tr>

                                                        <th width="230">开始</th>
                                                        <th width="230">结束</th>
                                                        <th width="230">价格</th>



                                                    </tr>
                                                    </thead>
                                                    <tbody>
                                                    <volist name="thuPrice" id="vo" key='i'>
                                                        <tr class="priceTr">
                                                            <td style="display:none;" class="priceId">{$vo['priceId']}</td>
                                                            <td class="priceStartTime">{:WSTFloatToTime($vo['periodStart'])}</td>
                                                            <td class="tomCheck" style="display:none">{$vo['isTom']}</td>
                                                            <td class="priceEndTime"><if condition="$vo['isTom'] eq 1">次日<else/>今日</if>{:WSTFloatToTime($vo['periodEnd'])}</td>
                                                            <td class = "periodPrice" >{$vo['price']}</td>
                                                            <td style = "display:none" class="action">2</td>

                                                        </tr>
                                                    </volist>
                                                    <tfoot>
                                                    </tfoot>
                                                    </tbody>
                                                </table>
                                            </div>
                                            <div class='wst-tab-item' style="position: relative;style='display:none'">
                                                <table class='wst-list table5'>
                                                    <thead>
                                                    <tr>

                                                        <th width="230">开始</th>
                                                        <th width="230">结束</th>
                                                        <th width="230">价格</th>




                                                    </tr>
                                                    </thead>
                                                    <tbody>
                                                    <volist name="friPrice" id="vo" key='i'>
                                                        <tr class="priceTr">
                                                            <td style="display:none;" class="priceId">{$vo['priceId']}</td>
                                                            <td class="priceStartTime">{:WSTFloatToTime($vo['periodStart'])}</td>
                                                            <td class="tomCheck" style="display:none">{$vo['isTom']}</td>
                                                            <td class="priceEndTime"><if condition="$vo['isTom'] eq 1">次日<else/>今日</if>{:WSTFloatToTime($vo['periodEnd'])}</td>
                                                            <td class = "periodPrice" >{$vo['price']}</td>
                                                            <td style = "display:none" class="action">2</td>

                                                        </tr>
                                                    </volist>
                                                    <tfoot>
                                                    </tfoot>
                                                    </tbody>
                                                </table>
                                            </div>
                                            <div class='wst-tab-item' style="position: relative;style='display:none'">
                                                <table class='wst-list table6'>
                                                    <thead>
                                                    <tr>

                                                        <th width="230">开始</th>
                                                        <th width="230">结束</th>
                                                        <th width="230">价格</th>




                                                    </tr>
                                                    </thead>
                                                    <tbody>
                                                    <volist name="satPrice" id="vo" key='i'>
                                                        <tr class="priceTr">
                                                            <td style="display:none;" class="priceId">{$vo['priceId']}</td>
                                                            <td class="priceStartTime">{:WSTFloatToTime($vo['periodStart'])}</td>
                                                            <td class="tomCheck" style="display:none">{$vo['isTom']}</td>
                                                            <td class="priceEndTime"><if condition="$vo['isTom'] eq 1">次日<else/>今日</if>{:WSTFloatToTime($vo['periodEnd'])}</td>
                                                            <td class = "periodPrice" >{$vo['price']}</td>
                                                            <td style = "display:none" class="action">2</td>

                                                        </tr>
                                                    </volist>
                                                    <tfoot>
                                                    </tfoot>
                                                    </tbody>
                                                </table>
                                            </div>
                                            <div class='wst-tab-item' style="position: relative;style='display:none'">
                                                <table class='wst-list  table7'>
                                                    <thead>
                                                    <tr>

                                                        <th width="230">开始</th>
                                                        <th width="230">结束</th>
                                                        <th width="230">价格</th>




                                                    </tr>
                                                    </thead>
                                                    <tbody>
                                                    <volist name="sunPrice" id="vo" key='i'>
                                                        <tr class="priceTr">
                                                            <td style="display:none;" class="priceId">{$vo['priceId']}</td>
                                                            <td class="priceStartTime">{:WSTFloatToTime($vo['periodStart'])}</td>
                                                            <td class="tomCheck" style="display:none">{$vo['isTom']}</td>
                                                            <td class="priceEndTime"><if condition="$vo['isTom'] eq 1">次日<else/>今日</if>{:WSTFloatToTime($vo['periodEnd'])}</td>
                                                            <td class = "periodPrice" >{$vo['price']}</td>
                                                            <td style = "display:none" class="action">2</td>

                                                        </tr>
                                                    </volist>
                                                    <tfoot>
                                                    </tfoot>
                                                    </tbody>
                                                </table>
                                            </div>
                                        </div>
                                    </div>
                                </td>
                            </tr>
                            <else/>
                            <tr>
                                <th width='120'>原价<font color='red'>*</font>：</th>
                                <td>{$object.marketPrice}</td>
                            </tr>
                            <tr>
                                <th width='120'>价格<font color='red'>*</font>：</th>
                                <td>{$object.shopPrice}</td>
                            </tr>
                        </if>


                        <!--<tr>-->
                        <!--<th width='120'>商品库存<font color='red'>*</font>：</th>-->
                        <!--<td>{$object.goodsStock}</td>-->
                        <!--</tr>-->
                        <!--<tr>-->
                        <!--<th width='120'>单位<font color='red'>*</font>：</th>-->
                        <!--<td>{$object.goodsUnit}</td>-->
                        <!--</tr>-->

                        <!--<tr>-->
                        <!--<th width='120'>商品状态<font color='red'>*</font>：</th>-->
                        <!--<td colspan='3'>-->
                        <!--<if condition="$object['isSale'] ==1 ">上架</if>-->
                        <!--<if condition="$object['isSale'] ==0 ">下架</if>-->
                        <!--</td>-->
                        <!--</tr>-->
                        <!--<tr>-->
                        <!--<th width='120'>所属分类<font color='red'>*</font>：</th>-->
                        <!--<td colspan='3'>{$object.goodsCats.goodsName1}->{$object.goodsCats.goodsName2}->{$object.goodsCats.goodsName3}</td>-->
                        <!--</tr>-->
                        <!--<tr>-->
                        <!--<th width='120'>店铺分类<font color='red'>*</font>：</th>-->
                        <!--<td colspan='3'>{$object.shopCats.goodsName1}->{$object.shopCats.goodsName2}</td>-->
                        <!--</tr>-->
                        <if condition="$object.goodsCatId1 neq 7">
                            <tr>
                                <th width='120'>商品信息：</th>
                                <td>
                                    {$object.goodsSpec}
                                </td>
                            </tr>

                            <tr>
                                <th width='120'>商品描述<font color='red'>*</font>：</th>
                                <td colspan='3'>
                                    {$object.goodsDesc|htmlspecialchars_decode}
                                </td>
                            </tr>
                            <else/>
                            <tr>
                                <th>出团日期：</th>

                                <td>{$object.startDate}
                                </td>
                            </tr>
                            <tr>
                                <th>出发城市：</th>

                                <td>{$object.startCity}</td>

                            </tr>
                        </if>

                        <tr>
                            <td colspan='3' style='padding-left:250px;'>
                                <button type="button" class="btn btn-danger" onclick='javascript:changeStatus({$object['goodsId']},0)'>禁&nbsp;售</button>
                                <button type="button" class="btn btn-primary" onclick='javascript:location.href="{:U('Admin/Goods/index')}"'>返&nbsp;回</button>
                            </td>
                        </tr>
                    </table>
            </div>
            <if condition="$object.goodsCatId1 eq 4 or $object.goodsCatId1 eq 5 or $object.goodsCatId1 eq 6">

                <div class='wst-tab-item' style="position: relative;style='display:none'">
                    <table class="wst-form">
                        <tr>
                            <th width='120'>有效期：</th>
                            <td>{$note.periodStart} -
                                {$note.periodEnd}</td>
                        </tr>

                        <tr>
                            <th width='120'>使用时间：</th>
                            <td>{$note.useTimeStart|WSTFloatToTime} -
                                {$note.useTimeEnd|WSTFloatToTime}</td>
                        </tr>

                        <tr>
                            <th width='120'>使用规则*</font>：</th>
                            <td colspan='3'>
                                {$note.useRule|htmlspecialchars_decode}
                            </td>
                        </tr>

                    </table>
                </div>
            </if>

            <if condition = "$object.goodsCatId1 eq 7">
                <div class='wst-tab-item' style="position: relative;style='display:none'">

                    <div class='wst-tbar-group' style='text-align:right'>
                        <span></span>
                        <button class="btn btn-default" type="button" style="padding: 6px 12px;height: 30px;line-height: 16px;margin-top: 0px;cursor: pointer;" data-toggle="modal" data-target="#myModal">新增</button>&nbsp;
                    </div>
                    <table class='wst-list'id="scheduleList" style="width:100%;">
                        <thead>
                        <tr>


                            <th>起点</th>
                            <th>终点</th>
                            <th>交通</th>
                            <th>图片</th>

                        </tr>
                        </thead>
                        <tbody>
                        <volist name="scheduleList" id="vo" key='i'>
                            <tr scheduleId="{$vo['scheduleId']}">
                                <td style="display:none;" class="scheduleId">{$vo['scheduleId']}</td>
                                <td class="startPoint">{$vo['startPoint']}</td>
                                <td class="endPoint">{$vo['endPoint']}</td>
                                <td class="transport">{$vo['transport']}</td>
                                <td class="scheduleThums"><img src="{$vo['scheduleThums']}" style="width:100px;height: 100px;padding:2px;"></td>
                                <td class = "scheduleContent" style="display:none;">{$vo['scheduleContent']}</td>

                            </tr>
                        </volist>
                        <tfoot>
                        </tfoot>
                        </tbody>
                    </table>
                </div>

            </if>


</form>
</div>
</div>
</form>
</body>
</html>